<script setup>
import { dateZhCN, zhCN } from 'naive-ui'
import * as G2 from '@antv/g2'
import { chartTheme } from '@/config'

const customTheme = () => {
  return chartTheme
}

G2.register('theme.custom', customTheme)

/**
 * @type import('naive-ui').GlobalThemeOverrides
 */
const themeOverrides = {
  Layout: {
    textColor: '#FFF',
  },
}
</script>

<template>
  <n-config-provider :locale="zhCN" :date-locale="dateZhCN" :theme-overrides="themeOverrides">
    <n-global-style />
    <router-view />
    <n-message-provider :duration="1000" keep-alive-on-hover :max="2">
      <MessageApi />
    </n-message-provider>
    <n-notification-provider :max="2">
      <NotificationApi />
    </n-notification-provider>
  </n-config-provider>
</template>

<style lang="scss" scoped>

</style>
